<div id="report" class="report-details ui-corner-all">
	
	<div class="report-head">
		<img src="templates/planeacion_desarrollo/images/actitud_logo_base.png">
		<span>{$report_name}</span>
	</div>
	
	<!--div class="report-numbers">
		<div class="number-item">
			total_projectos: [$total_projectos],
			proyectos_cerrados: [$proyectos_cerrados],
			Porcentaje global completado: [$porcentaje_global],
			total metas:
			metas en tiempo:
			metas a destiempo:
			total tareas:
			tareas completas:
			tareas completadas a tiempo
			tareas completadas a destiempo:
		</div>
	</div-->
	
	<div class="report-content">
		
		<h3>{#projects#}</h3>
		
		{foreach key=key item=project from=$report}
		<div class="report-item ui-corner-all">
			
			<div class="project-title">{$project.name}</div>
			<div class="project-desc">{$project.desc|strip_tags}</div>
			<div class="project-percentage">{#completed#}: <strong>{$project.done}%</strong></div>
			<div class="project-budget">{#budget#}: <strong>${$project.budget}</strong></div>
			<div class="project-datstart">{#start#}: <strong>{$project.startstring}</strong></div>
			<div class="project-datend">{#end#}: <strong>{$project.endstring}</strong></div>
			
			{if $project.companies}
			<div class="project-companies">
				{#companies_involved#}:
				{foreach key=ck item=company from=$project.companies}{if $ck != 0}, {/if}<strong>{$company.name}</strong>{/foreach}.
			</div>
			{/if}
			
			<h4>{#milestones#}</h4>
			{if $project.milestones}
			<table>
				<thead>
					<tr>
						<th>{#name#}</th>
						<th>{#description#}</th>
						<th>{#start#}</th>
						<th>{#end#}</th>
						<th>{#daysleft#}</th>
					</tr>
				</thead>
				<tbody>
					{foreach key=mk item=milestone from=$project.milestones}
					<tr {if $milestone.ID % 2 == 0} class="zebra" {/if}>
						<td class="milestone-name">{$milestone.name}</td>
						<td class="milestone-desc">{$milestone.desc|strip_tags}</td>
						<td class="milestone-inidte">{$milestone.start|date_format:"%A, %B %e, %Y"}</td>
						<td class="milestone-endate">{$milestone.end|date_format:"%A, %B %e, %Y"}</td>
						<td class="milestone-daysleft">{$milestone.daysleft}</td>
					</tr>
					{/foreach}
				</tbody>
				
			</table>
			{else}
			<div class="no-data">
				{#no_milestones#}
			</div>
			{/if}
			
			<h4>{#tasks#}</h4>
			{if $project.tasks}
			<table>
				<thead>
					<tr>
						<th>{#tasks#}</th>
						<th>{#user#}</th>
						<th>{#end#}</th>
						<th>{#daysleft#}</th>
						<th>{#tasks_priorities_label#}</th>
					</tr>
				</thead>
				<tbody>
					{foreach key=i item=task from=$project.tasks}
					<tr class="noborderbottom {if $task.ID % 2 == 0} zebra {/if}">
						<td class="task-title">{$task.title}</td>
						<td class="task-user">{$task.user}</td>
						<td class="task-end">{$task.endstring}</td>
						<td class="task-daysleft">{$task.daysleft}</td>
						<td class="task-priority">{$task.prioritystring}</td>
					</tr>
					<tr>
						<td colspan="5">{$task.text}</td>
					</tr>
					{/foreach}
				</tbody>
				
			</table>
			{else}
			<div class="no-data">
				{#no_tasks#}
			</div>
			{/if}
			
			
			{if $project_files}
			<h4>{#files#}</h4>
			{if $project.files}
			<table>
				<thead>
					<tr>
						<th>{#name#}</th>
						<th>{#description#}</th>
						<th>{#added#}</th>
						<th>{#filetype#}</th>
						<th>{#attachedby#}</th>
					</tr>
				</thead>
				<tbody>
					{foreach key=fk item=file from=$project.files}
					<tr {if $file.ID % 2 == 0} class="zebra" {/if} >
						<td class="file-name">{$file.name}</td>
						<td class="file-desc">{$file.desc|strip_tags}</td>
						<td class="file-added">{$file.added|date_format:"%A, %B %e, %Y"}</td>
						<td class="file-type">{$file.type}</td>
						<td class="file-addedby">{$file.username}</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
			{else}
			<div class="no-data">
				{#no_files#}
			</div>
			{/if}
			{/if}
			
		</div>
		{/foreach}
		
	</div>
				
</div>